#ifndef DATAVIEW_H
#define DATAVIEW_H

#include <QWidget>
#include "GameData/gamedata.h"
namespace Ui {
class DataView;
}

class DataView : public QWidget
{
    Q_OBJECT

public:
    explicit DataView(QWidget *parent = nullptr);
    ~DataView();
    void AddDataItem(QString name,int i);
    void AddDataItem(QString name,float f);
    void AddDataItem(QString name,bool b);
    void AddDataItem(QString name,QString s);
private:
    inline void AddDataItemWidget(QString name,QString value);
    void Init();
    void RefreshDataItem();
    Ui::DataView *ui;
    QString img;
};

#endif // DATAVIEW_H
